/**
 * *************************************
 * Copyright(c)2016 Dingdang Yixia 
 * All Rights Reserved.
 *
 * @File: HBCampaignController.java
 * @Package: com.ddyx.rest
 * @Description:
 * 
 * @Version: V1.0
 * @Author: Yidong.Xiang
 * @Date: 2017年12月7日 下午2:37:40
 * 
 * *************************************
 */
package com.ddyx.rest;

import javax.annotation.Resource;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

import com.ddyx.service.IWxUserBonusService;
import com.ddyx.util.RequestForm;
import com.ddyx.util.ResponseForm;

/**
 * @ClassName: WxUserCampaignController.java
 * @Module: 微信用户拆红包活动请求控制器模块
 * @Description: 提供一起拆红包、拆一个新红包、查看好友手气功能
 * 
 * @author: Yidong.Xiang
 * @date: 2017年12月7日 下午2:37:40
 * 
 */
@Controller
@RequestMapping("/hb")
public class WxUserBonusController {

	@Resource
	IWxUserBonusService wxUserBonusService;
	/**
	 * 微信用户查看我的红包
	 * @param requestForm
	 * @return
	 */
	@ResponseBody
	@RequestMapping(value = "/getMyBonus", method = RequestMethod.POST)
	public ResponseForm getMyBonus(@RequestBody RequestForm requestForm) {
		
		return wxUserBonusService.findMyBonus(requestForm);
	}
	/**
	 * 微信用户查看好友手气，返回一个活动实例参团好友的红包
	 * @param requestForm
	 * @return
	 */
	@ResponseBody
	@RequestMapping(value = "/getFriendBonus", method = RequestMethod.POST)
	public ResponseForm getFriendBonus(@RequestBody RequestForm requestForm) {
		
		return wxUserBonusService.findCampInstanceBonus(requestForm);
	}
	
}
